﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="jq_ajax02.aspx.cs" Inherits="temp_jq_ajax02" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ajax of jquery</title>
	<script type="text/javascript" src="../jquery/126/jquery-1.2.6.js"></script>	<script language="javascript" type="text/javascript">	    function GetNameList()	    {	        //var urlstring='../ajax/companylist.aspx?lc='+$("#cname").val();	        var urlstring='../ajax/listmanlist.ashx';	        	        $.ajax({	            async: true,	            url:urlstring,	            type:'get',	            dataType:'html',	            timeout:1000,	            beforeSend:function()	            {	                $("#namelist").empty().append("<img id='loading' src='../images/loading2.gif' />");	            },	            complete:function()	            {	                $("#loading").remove();	            },	            error:function()	            {	                alert('ajax read error!');	            },	            success: function(msg)	            {	                $("#namelist").append(msg);	            }	        });	    }	</script></head>
<body>
    <form id="form1" runat="server">
    <div>
        客户:<asp:TextBox ID="cname" runat="server"></asp:TextBox><br /><input type="button" onclick="GetNameList()" style="width: 75px" title="read" name="read" value="read" />
        <div id="namelist"></div>
    </div>
    </form>
</body>
</html>
